package cepicam.src.db.mysql;
import java.sql.*;

public class ConnectionDBMysql {

	private static String url = "jdbc:mysql://localhost:3306/cepicamdb";
	
	private static String user = "root";
	
	private static String passwd = "cepicam";
	
	private static Connection connect;
	
	public static Connection getInstance(){
		if(connect==null){
			
			try {
				connect = DriverManager.getConnection(url,user,passwd) ;
				connect.setAutoCommit(false);
				}
				catch(SQLException sqle) {
					System.err.println("Erreur lors de la connexion : " + sqle) ;
				}
		}
		return connect;
	}

}
